﻿Imports System.Windows.Forms

Public Class SettingsForm

#Region " Event Handlers "

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        My.Settings.Save()
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        My.Settings.Reload()
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub ShowTipsButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShowTipsButton.Click
        Utilities.ShowTipsAtStartup(forceTipDisplay:=True)
    End Sub

    Private Sub SettingsForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'Persist the settgins as they are now.  This way they can be restored just like they are now if the user cancels.
        My.Settings.Save()
    End Sub

#End Region

End Class
